package com.fwmagic.dp._2;

public class Main {
    public static void main(String[] args) {
        AbstractHumanFactory factory = new HumanFactory();
        YellowHuman yellowHuman = factory.createHuman(YellowHuman.class);
        yellowHuman.getColor();
        yellowHuman.talk();
        System.out.println("=============");

        BlackHuman blackHuman = factory.createHuman(BlackHuman.class);
        blackHuman.getColor();
        blackHuman.talk();
        System.out.println("=============");

        WhiteHuman whiteHuman = factory.createHuman(WhiteHuman.class);
        whiteHuman.getColor();
        whiteHuman.talk();

        System.out.println("####################");

        WhiteHuman human = HumanFactory2.createHuman(WhiteHuman.class);
        human.getColor();
        human.talk();
    }
}
